<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--[if lt IE 9]>
　　　　<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
　　<![endif]-->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/sytle.css?v=0.2&d=2016-11-08">
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-2.1.4.min.js"></script>
<title>订单选择页面</title>
</head>
<script type="text/javascript">

</script>
<body>
<form action="${pageContext.request.contextPath}/order/create.html"  id="myform" name="myform">
	<div class="hgj">
		<div class="page-all" style="margin-bottom: 0;">
			<div class="container">
				<!--内容开始-->
				<c:if test="${empty sessionScope.CONTACT}">
					<!--选择服务地址-->
					<div class="order-list" onclick="address()">
						<div class="o-l-left">
							<img src="images/address-icon.png" />
						</div>
						<div class="o-l-midd">
							<span>请选择服务地址</span>
						</div>
						<div class="o-l-right">
							<img src="images/right.png" />
						</div>
					</div>
				</c:if>
				<c:if test="${not empty sessionScope.CONTACT}">
					<!--选择服务地址-->
					<div class="order-list-sure">
						<div class="o-ls-left">
							<img
								src="${pageContext.request.contextPath}/images/address-icon.png" />
						</div>
						<div class="o-ls-midd">
							<p>服务地址：</p>
							<p>${sessionScope.CONTACT.wCAddress}</p>
							<p>${sessionScope.CONTACT.wCContact}</p>
							<p>${sessionScope.CONTACT.wCTelephone}</p>
						</div>
						<div class="o-ls-right">
							<a href="${pageContext.request.contextPath}/members/contacts.html">
								<img src="${pageContext.request.contextPath}/images/right.png" />
							</a>
						</div>
					</div>
				</c:if>
				<!--订单详情-->
				<div class="order-detail">
					<div class="o-d-left">
						<img
							src="${pageContext.request.contextPath}/images/order-icon.png" />
					</div>
					<c:if test="${sessionScope.TASK_INFO.serviceType == 0 || sessionScope.TASK_INFO.serviceType == 11 || sessionScope.TASK_INFO.serviceType == 12}">
					<div class="o-d-midd" style="padding-top: 0.8rem;">
						<p>订单详情：</p>
						<p>服务类型：${sessionScope.TASK_INFO.serviceName}</p>
						<p>服务人数：${sessionScope.TASK_INFO.staffCount}人</p>
						<span class="od-price-l">平日价格</span> <span class="od-price-r">${sessionScope.TASK_INFO.price}/小时</span>
						<br> <span class="od-price-l">服务时长</span> <span
							class="od-price-r">${sessionScope.TASK_INFO.hours}小时
							￥${sessionScope.TASK_INFO.fee}元</span>
					</div>
					</c:if>
					<c:if test="${sessionScope.TASK_INFO.serviceType != 0 && sessionScope.TASK_INFO.serviceType != 11 && sessionScope.TASK_INFO.serviceType != 12}">
					<div class="o-d-midd" style="padding-top: 0.8rem;">
						<p>订单详情：</p>
						<p>服务类型：${sessionScope.TASK_INFO.serviceName}</p>
						
						<span class="od-price-l">费用</span> <span
							class="od-price-r">￥${sessionScope.TASK_INFO.fee}元</span>
					</div>
					</c:if>
				</div>
				<c:if test="${sessionScope.TASK_INFO.serviceType == 0}">
					<!--服务时长-->
					<div class="time-detail">
						<div class="t-d-left">
							<img
								src="${pageContext.request.contextPath}/images/fuwu-time-icon.png">
						</div>
						<div class="t-d-midd">
							<p>服务时间：</p>
							<p>${sessionScope.TASK_INFO.subDate}
								${sessionScope.TASK_INFO.subTime}</p>
						</div>
					</div>
				</c:if>
				<c:if test="${sessionScope.TASK_INFO.serviceType == 11 || sessionScope.TASK_INFO.serviceType == 12}">
					<!--选择服务时长-->
					<div class="time-detail">
						<div class="t-d-left">
							<img
								src="${pageContext.request.contextPath}/images/fuwu-time-icon.png">
						</div>
						<div class="td-midd-start">
							<p>服务开始时间：</p>
							<p>${wdate }</p>
							<input type="hidden" id="wdate" name="wdate" value="${wdate }" />
						</div>
						<div class="td-l-right">
							<a href="${pageContext.request.contextPath}/goods/wardrobeTime.html">
								<img src="${pageContext.request.contextPath}/images/right.png" />
							</a>
						</div>
					</div>
				</c:if>
				<!--选择优惠券-->
				<c:if test="${empty sessionScope.COUPON_INFO}">
				<div class="order-list">
					<div class="o-l-left">
						<img
							src="${pageContext.request.contextPath}/images/ticket-icon.png" />
					</div>
					<div class="o-l-midd">
						<span>请选择优惠券</span>
					</div>
					<div class="o-l-right">
						<a href="${pageContext.request.contextPath}/members/useCouponList.html"><img src="${pageContext.request.contextPath}/images/right.png" /></a>
					</div>
				</div>
				</c:if>
				<c:if test="${not empty sessionScope.COUPON_INFO}">
				<div class="order-list">
					<div class="o-l-left">
						<img
							src="${pageContext.request.contextPath}/images/ticket-icon.png" />
					</div>
					<div class="o-l-midd-sure">
						<span>${sessionScope.COUPON_INFO.wMcCouponTitle}优惠:${sessionScope.COUPON_INFO.wMcMoney}元</span>
					</div>
					<div class="o-l-right">
						<a href="${pageContext.request.contextPath}/members/useCouponList.html"><img src="${pageContext.request.contextPath}/images/right.png" /></a>
					</div>
				</div>
				</c:if>
			</div>
		</div>
		
		<!--底部-->
		<footer>
			<a  onclick="sub();" class="sumit-btn">确认订单</a>
		</footer>
		

	</div>
	
	<!---提示弹窗(未输入手机号码的弹出框，注册点击后弹出，2秒后自动消失)--->
    <div class="login-layer" style=" display:none;" id="tip"> <span id="tipMsg"></span> </div>
	</form>
	<script type="text/javascript">
        function sub(){
        	
        	var isShow=true;
        	var type="${sessionScope.TASK_INFO.serviceType}";
        	if(parseInt(type)==11){
        		var wdate=$("#wdate").val();
        		if(wdate==null || wdate==""){
            		$("#tip").show();
         	   		$("#tipMsg").text("请选择服务预定时间！");
         	   		isShow = false; 
         		  	
         		  	close();
         		  	return;
            	}
        	}
        	
        	
        	if(isShow){
        		$('#myform').submit();
        	}
        	
        }
        
        function close() {
    	 	setTimeout(function() {
    	 		$("#tip").hide();
    	 	}, 2000);
     	}
</script>

</body>
</html>
